<html>
<head><meta charset="utf-8"><title>bootstrapping while target is set in .cargo/config.toml · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html">bootstrapping while target is set in .cargo/config.toml</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="240869641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240869641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240869641">(May 31 2021 at 20:42)</a>:</h4>
<p>it seems like x.py tries to grab the <code>target</code> from <code>.config/cargo.toml</code> rather than from whatever is specified in the rustc <code>config.toml</code> when building <code>bootstrap</code>, is this intended? seems a bit counter-intuitive and also not very easy to fix since there is <code>bootstrap/debug/foo</code> hardcoded in a bunch of places (if we pass --target explicitly then it will need to be <code>target/&lt;build-triple&gt;/debug/foo</code></p>



<a name="240870234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240870234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240870234">(May 31 2021 at 20:52)</a>:</h4>
<p>well, x.py doesn’t grab .cargo/config.toml per se but it invokes cargo without --target and then cargo looks there</p>



<a name="240870513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240870513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240870513">(May 31 2021 at 20:57)</a>:</h4>
<p>.cargo/config.toml should generally be empty when using x.py, it's not supported</p>



<a name="240870536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240870536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240870536">(May 31 2021 at 20:57)</a>:</h4>
<p>why are you configuring targets there, instead of via --target or [build.target]</p>



<a name="240871800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240871800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240871800">(May 31 2021 at 21:17)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml/near/240870536">said</a>:</p>
<blockquote>
<p>why are you configuring targets there, instead of via --target or [build.target]</p>
</blockquote>
<p>we configure targets there for other cross-compilation that we need to do after building rustc, but in an ideal world <code>rustc</code> would just ignore the config entirely</p>



<a name="240871856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240871856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240871856">(May 31 2021 at 21:18)</a>:</h4>
<p>(we also do configure the right targets in [build.target], but x.py doesn't look there)</p>



<a name="240872023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872023">(May 31 2021 at 21:19)</a>:</h4>
<p>Not sure I understand: x.py definitely looks in it's own config file, but yes it won't look in .cargo/config.toml</p>



<a name="240872070"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872070" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872070">(May 31 2021 at 21:20)</a>:</h4>
<p>are you trying to share the rustc repository with some other workspace or something?</p>



<a name="240872093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872093">(May 31 2021 at 21:20)</a>:</h4>
<p>no, let me try to explain more clearly</p>



<a name="240872144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872144">(May 31 2021 at 21:21)</a>:</h4>
<p>we set values in the rustc config.toml (the one with the [llvm] section and such) as follows:</p>
<div class="codehilite" data-code-language="TOML"><pre><span></span><code>            <span class="n">changelog-seen</span> <span class="o">=</span> <span class="mi">2</span>

            <span class="k">[llvm]</span>
            <span class="n">targets</span> <span class="o">=</span> <span class="s">"X86"</span>

            <span class="k">[build]</span>
            <span class="n">target</span> <span class="o">=</span> <span class="k">["x86_64-unknown-managarm-system", "x86_64-unknown-linux-gnu"]</span>
            <span class="n">build-dir</span> <span class="o">=</span> <span class="s">"@THIS_BUILD_DIR@"</span>
            <span class="n">docs</span> <span class="o">=</span> <span class="kc">false</span>

            <span class="k">[install]</span>
            <span class="n">prefix</span> <span class="o">=</span> <span class="s">"@PREFIX@"</span>

            <span class="k">[rust]</span>
            <span class="n">codegen-tests</span> <span class="o">=</span> <span class="kc">false</span>

            <span class="k">[target.x86_64-unknown-linux-gnu]</span>
            <span class="n">llvm-config</span> <span class="o">=</span> <span class="s">"@BUILD_ROOT@/tools/host-llvm-toolchain/bin/llvm-config"</span>

            <span class="k">[target.x86_64-unknown-managarm-system]</span>
            <span class="n">llvm-config</span> <span class="o">=</span> <span class="s">"@BUILD_ROOT@/tools/host-llvm-toolchain/bin/llvm-config"</span>
</code></pre></div>



<a name="240872289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872289">(May 31 2021 at 21:22)</a>:</h4>
<p>we also have a $CARGO_HOME/config.toml file which contains (plus some other patches)</p>
<div class="codehilite" data-code-language="TOML"><pre><span></span><code><span class="k">[build]</span>
<span class="n">rustc</span> <span class="o">=</span> <span class="s">"/var/bootstrap-managarm/build/tools/host-rust/bin/rustc"</span>
<span class="n">target</span> <span class="o">=</span> <span class="s">"x86_64-unknown-managarm-system"</span>
</code></pre></div>



<a name="240872316"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872316" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872316">(May 31 2021 at 21:22)</a>:</h4>
<p>now if i comment out the bottom line in the <code>$CARGO_HOME/config.toml</code>, everything works fine</p>



<a name="240872377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872377">(May 31 2021 at 21:23)</a>:</h4>
<p>Yeah, I see. x.py was not designed with system-wide cargo home like that in mind, though there's no fundamental reason it shouldn't be, I guess</p>



<a name="240872385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872385">(May 31 2021 at 21:23)</a>:</h4>
<p>the problem is that when x.py invokes cargo to build <code>bootstrap</code>, it doesn't pass any <code>--target</code> (as far as i can tell)</p>



<a name="240872432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872432">(May 31 2021 at 21:24)</a>:</h4>
<p>in an ideal world we could just opt out of using that config.toml entirely but that is not possible atm</p>



<a name="240872433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872433">(May 31 2021 at 21:24)</a>:</h4>
<p>We could start passing that, with some editing to the bootstrap code, I don't see any problems there</p>



<a name="240872446"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872446" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872446">(May 31 2021 at 21:24)</a>:</h4>
<p>i have a local patch but i don't know how much stuff it will break</p>



<a name="240872447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872447">(May 31 2021 at 21:24)</a>:</h4>
<p>but yeah opt-out seems <em>maybe</em> better</p>



<a name="240872457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872457">(May 31 2021 at 21:24)</a>:</h4>
<p>if we pass --target then the <code>target/</code> dir also starts to look a bit different so <code>bootstrap</code> needs a fixup too</p>



<a name="240872477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872477">(May 31 2021 at 21:24)</a>:</h4>
<p>I'd be happy to review a PR with --target passed explicitly to the rustbuild build(s)</p>



<a name="240872500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872500">(May 31 2021 at 21:25)</a>:</h4>
<p>yeah, there's likely a few places that need adjustment</p>



<a name="240872523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872523">(May 31 2021 at 21:25)</a>:</h4>
<p>There might be a way to override the file config with an empty target or something like that</p>



<a name="240872589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872589">(May 31 2021 at 21:26)</a>:</h4>
<p>like make a .cargo/config.toml inside the rustc src dir or something?</p>



<a name="240872599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872599">(May 31 2021 at 21:26)</a>:</h4>
<p>yeah, maybe, though not sure on actually landing that</p>



<a name="240872602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872602">(May 31 2021 at 21:26)</a>:</h4>
<p>here's my crappy patch which suffices for our purposes <a href="https://github.com/64/bootstrap-managarm/blob/fix-rust/patches/rust/0002-managarm-fix-build-target-in-x.py-and-bootstrap.patch">https://github.com/64/bootstrap-managarm/blob/fix-rust/patches/rust/0002-managarm-fix-build-target-in-x.py-and-bootstrap.patch</a></p>



<a name="240872609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872609">(May 31 2021 at 21:26)</a>:</h4>
<p>but I would try CARGO_BUILD_TARGET="" first</p>



<a name="240872629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872629">(May 31 2021 at 21:27)</a>:</h4>
<p>i think x.py already ignores that</p>



<a name="240872631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872631">(May 31 2021 at 21:27)</a>:</h4>
<p>yeah that patch looks pretty close</p>



<a name="240872648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872648">(May 31 2021 at 21:27)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/6a3dce99f6ee4fd1ae317fe486b214dad7f4c1ee/src/bootstrap/bootstrap.py#L873-L876">https://github.com/rust-lang/rust/blob/6a3dce99f6ee4fd1ae317fe486b214dad7f4c1ee/src/bootstrap/bootstrap.py#L873-L876</a></p>



<a name="240872669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872669">(May 31 2021 at 21:28)</a>:</h4>
<p>cool, thanks for the help</p>



<a name="240872706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872706">(May 31 2021 at 21:28)</a>:</h4>
<p>yes, we delete that environment variable -- I'm saying maybe instead setting it to something like an empty string will get override the config, essentially deleting the value from the config (rather than just not letting CARGO_BUILD_TARGET get inherited)</p>



<a name="240872714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872714">(May 31 2021 at 21:28)</a>:</h4>
<p>I sort of doubt it though</p>



<a name="240872730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872730">(May 31 2021 at 21:28)</a>:</h4>
<p>i might upstream it once we're a little more mature (and maybe even upstream our os as a new target if possible :^)</p>



<a name="240872736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matt Taylor <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872736">(May 31 2021 at 21:28)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml/near/240872706">said</a>:</p>
<blockquote>
<p>yes, we delete that environment variable -- I'm saying maybe instead setting it to something like an empty string will get override the config, essentially deleting the value from the config (rather than just not letting CARGO_BUILD_TARGET get inherited)</p>
</blockquote>
<p>oh, right</p>



<a name="240872737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/bootstrapping%20while%20target%20is%20set%20in%20.cargo/config.toml/near/240872737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/bootstrapping.20while.20target.20is.20set.20in.20.2Ecargo.2Fconfig.2Etoml.html#240872737">(May 31 2021 at 21:28)</a>:</h4>
<p>anyway, would be happy to see a PR with that patch -- my guess is it might need a tad more work for e.g. bootstrap tests to pass, but should be almost good to go</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>